package tms.model;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class Aircraft {
    public static final String TABLE_NAME = "Aircraft";
    public static String[] COLUMNS = {"Name", "Code", "IsActive"};

    private int id = -1;
    private String name = "";
    private String code = "";
    private boolean isActive = false;

    public String[] getValues() {
        return new String[] {"'" + getName() + "'", "'" + getCode() + "'",
                isActive() == true ? "1" : "0"};
   }

    public String toString(){
        return name + " (" + code + ")";
   }

    @XmlElement
    public int getId() {
        return id;
   }
    public void setId(int id) {
        this.id = id;
   }

    @XmlElement
    public String getName() {
        return name;
   }
    public void setName(String name) {
        this.name = name;
   }

    @XmlElement
    public String getCode() {
        return code;
   }
    public void setCode(String code) {
        this.code = code;
   }

    @XmlElement
    public boolean isActive() {
        return isActive;
   }

    public void setActive(boolean isActive) {
        this.isActive = isActive;
   }
}
